﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WinFormsApp1
{
    public class TableInfo
    {
        public string TableName { get; set; }   
        public List<DataColumInfo> Columns { get; internal set; }=new List<DataColumInfo>();
        public DataTable RefDataTable { get; internal set; }

        /// <summary>
        /// 实体列,有一堆选择的列，前缀+列+后缀 组成
        /// </summary>
        public List<EntityNaming> EntityColumns = new List<EntityNaming>();

        public List<string> GetAllColumnNames()
        {
            List<string> str = new List<string>();
            for (var i = 0; i < RefDataTable.Columns.Count; i++)
            {
                str.Add(RefDataTable.Columns[i].ColumnName);
            }
            return str;
        }
    }
}
